#include "ustandard/ustandard_def.h"
#include "direntcb.c"
int print_file_info(struct dirent* d, int depth, void* arg)
{
    int ret = 0;
    size_t len;
    const char* ignore_folder = ".svn";
    size_t len_cmp = strlen(ignore_folder);
    if(4 == d->d_type 
            && (len=strlen(d->d_name))>=len_cmp
            && 0 == strcmp(d->d_name+len-len_cmp, ignore_folder)) {
        ret = -1;
        return ret;
    }

    int i;
    for(i=0; i<depth; i++) {
        printf("\t");
    }
    printf("[%d]%s\n", d->d_type, d->d_name);

    return ret;
}


int main(int argc, char* argv[])
{
    while(0 == wavcam_direntcb(argv[1], 
        1, 
        0,
        print_file_info, 
        NULL))break;


    return 0;
}
